add_library( util "" )

set( util_HEADERS
	typeAliases.hpp
	meshTypes_fwd.hpp
	globals.hpp
	signalCodes.hpp
	crtpBase.hpp
)
list(TRANSFORM util_HEADERS PREPEND ${INC_DIR}/ )

target_sources( util PUBLIC
	${util_HEADERS}
)

target_include_directories( util PUBLIC
	${INC_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}
)

target_sources( util PRIVATE
	timer.hpp
	timing.hpp
	timing.tpp
	exceptions.cpp
	exceptions.hpp
	util.cpp
	util.hpp
	util.tpp
	runCommand.hpp
	runCommand.cpp
	cacheInfo.hpp
	cacheInfo.cpp
)

target_compile_options( util PUBLIC
	${ALL_WARNINGS_AS_ERRORS}
)

target_link_libraries( util PUBLIC
	Eigen3::Eigen
	spdlog
)

if (OpenMP_CXX_FOUND)
	target_link_libraries( util PUBLIC
		OpenMP::OpenMP_CXX
	)
endif()
